package Work13;

import Work13.People;

public class Teacher extends People {
    private int work_age;

    public Teacher(String name, String sex, int age, int work_age) {
        super(name, sex, age);
        this.work_age = work_age;
    }
    public void teach(){
        System.out.println("我承诺好好教学");
    }

    @Override
    public String play() {
        return super.play()+"象棋";
    }
    @Override
    public String toString() {
        return "Teacher{" +
                "work_age=" + work_age +
                '}'+super.toString();
    }
    public void printlf(){
        System.out.println(super.base());
        play();
        teach();
    }
}
